home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / unix / volume24 / faxpax / part04 < prev    next >
Encoding:
Internet Message Format  |  1991-03-12  |  53.6 KB

  1. Subject:  v24i042:  Email fax-sending package, Part04/05
  2. Newsgroups: comp.sources.unix
  3. Approved: rsalz@uunet.UU.NET
  4. X-Checksum-Snefru: aa7f3a8f 27b96e5b 6309bc88 b104f594
  5.  
  6. Submitted-by: klaus u schallhorn <cnix!klaus>
  7. Posting-number: Volume 24, Issue 42
  8. Archive-name: faxpax/part04
  9.  
  10. #! /bin/sh
  11. # This is a shell archive.  Remove anything before this line, then feed it
  12. # into a shell via "sh file" or similar.  To overwrite existing files,
  13. # type "sh file -c".
  14. # The tool that generated this appeared in the comp.sources.unix newsgroup;
  15. # send mail to comp-sources-unix@uunet.uu.net if you want that tool.
  16. # Contents:  Readme faxhost/faxfonts/diykit.h
  17. #   faxhost/faxfonts/hires.uue faxhost/faxfonts/lores.uue
  18. #   faxhost/fntwrite.c faxhost/pbmtog3.c faxhost/sierracmd.h
  19. #   sample.fax.list
  20. # Wrapped by rsalz@litchi.bbn.com on Wed Mar 13 14:08:03 1991
  21. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  22. echo If this archive is complete, you will see the following message:
  23. echo '          "shar: End of archive 4 (of 5)."'
  24. if test -f 'Readme' -a "${1}" != "-c" ; then 
  25.   echo shar: Will not clobber existing file \"'Readme'\"
  26. else
  27.   echo shar: Extracting \"'Readme'\" \(6969 characters\)
  28.   sed "s/^X//" >'Readme' <<'END_OF_FILE'
  29. XThis  is   faxpak   [Copyright   (C)   1991   klaus   schallhorn,
  30. Xklaus@cnix.uucp]
  31. X
  32. Xfaxpak currently runs on Suns only - not because it uses any spe-
  33. Xcial  SunOs features, but because I don't have access to anything
  34. Xelse. I developed faxpak mainly on a 4/60, then  moved  it  to  a
  35. X3/60 that does all our spooling.
  36. X
  37. XApart from [temporary] hardware and  typeface  restrictions  [see
  38. Xbelow]  faxpak is quite flexible. It allows faxes to be sent from
  39. Xany networked machine. It allows aliases and distribution  lists.
  40. XEntries  in  such  lists needing a special "for the attention of"
  41. Xstring are forked out as separate jobs.  If you have more than  1
  42. Xfax  modem,  faxpak  automatically  shares the load between these
  43. Xmodems. This includes splitting of batches to distribution  lists
  44. Xinto several queues.
  45. X
  46. Xfaxpak enforces permissions. You can set faxpak up to send  local
  47. Xfaxes  any  time, long distance ones and international ones to be
  48. Xsent at cheap rates only. You can enforce the sending of faxes to
  49. Xany  given  phone  number at fixed times. And you can permit some
  50. Xusers to override these time restrictions.
  51. X
  52. Xfaxpak was created when the post office  increased  our  contract
  53. Xpostage rates to an almost insane level. We therefore decided [as
  54. Xa small publishing house] to  deliver  our  newsletter  by  other
  55. Xmeans.  We  now  deliver  by mail(1) to subscribers' mailboxes at
  56. Xvarious online and video text systems, we allow direct modem con-
  57. Xnection to mbox [our 3/60] and we fax our newsletter.
  58. X
  59. Xfaxpak is used for oneoff faxes [and only if I can't email],  and
  60. Xhas  been  used  three  times  [we  publish every other week] for
  61. Xbatches of ~150 faxes @ five pages each to our  subscriber  list.
  62. XBatches of this size take a good two nights to send out, although
  63. Xthe pure transmission time is just under 12 hours  [the  rest  is
  64. Xengaged  phone lines, repeats because transmission errors, logins
  65. Xsneaking in on the faxmodems, etc].
  66. X
  67. Xfaxpak currently supports touchbase's 2496 fax modem  and  others
  68. Xthat  use  or emulate the sierra type fax chipset, such as zoom's
  69. Xmx 2400s. Early december I found someone willing  and  supposedly
  70. Xable  to ship a beta class2 modem. Unfortunately it seems to have
  71. Xbeen sent by bicycle.  It's supposed to be here "real soon now".
  72. X
  73. XFor this reason faxpak does [not yet] support other  modems,  nor
  74. Xdoes it allow incoming faxes.
  75. X
  76. XBecause of the peculiarities of the modems we use  faxpak  is  by
  77. Xfar   not   what  I  wanted.  It  now  works,  but  incorporating
  78. Xpostscript, TeX or other files has been delayed.
  79. X
  80. XPorting  faxpak  to  other  platforms  should  be  easy.  Writing
  81. Xwiring.c  was  supposed  to  be  easy  as well. Provided you have
  82. Xhardware flow control, it will be easy, however. I have not  been
  83. Xable  to  use XON/XOFF flow ctl under SunOs, although initial and
  84. Xparallel development under msdos showed xonoff to work  there.  I
  85. Xdon't  know  why it doesn't under SunOs. There's some interesting
  86. Xreference to a change to STREAMS and xon/xoff flow ctl  in  SunOs
  87. X4.1  in  the  user  manual for a CoALM Sbus card I just received.
  88. XI've done printer drivers and a terminal emulator using xonoff in
  89. Xthe  past  and  using SunOs, though, so I assume the modem has to
  90. Xtake a large part of any blame.
  91. X
  92. XJust to show you how "strange" the sierra type modems  are,  con-
  93. Xsider  incoming faxes: you have to check [for each incoming byte]
  94. Xwhether carrier is high or low in order  to  distinguish  whether
  95. Xthe  byte  received  is  fax data or some command or confirmation
  96. Xfrom the modem.
  97. X
  98. XSimilar problems were encountered with sending faxes.  You  first
  99. Xtalk  to  the  fax modem @ 2400 baud, change to 19200, then dial,
  100. Xand wait either for an XON [if using xonoff] or  for  CTS  to  go
  101. Xhigh,  before  you  [in the case of xon/xoff enable flow ctl and]
  102. Xstart squirting data. Between pages you turn  off  flow  control,
  103. Xonly to re-enable it for the next page. Weird.
  104. X
  105. XYou could, of course, write a special  device  driver  to  handle
  106. Xthis  [but  then you could have hardware dependencies in any pro-
  107. Xgram], or you could take a black box approach, as  some  vendors'
  108. Xtech  reps  seemed  to  slip: using a pc type mother board with a
  109. Xlarge buffer and a fax card built on top.
  110. X
  111. XIf you look at wiring.c you'll find that I  left  some  stubs  in
  112. Xthere  for using xonoff. Please don't tell me "xonoff flow ctl is
  113. Xeasy, it's done in such and such a way" unless you get it to work
  114. Xwith a sierra type modem. I found that the modem dropped the line
  115. Xwhen I was using xonoff, or that the  remote  fax  machine  timed
  116. Xout. Both not very useful.
  117. X
  118. X
  119. XAs far as I know touchbase's 2496 does not yet come officially as
  120. Xa  sierra type modem, although I bought their programmer's kit in
  121. XNov '90.  This kit [about $100 on top of the  modem  price],  for
  122. Xwhich  you have to sign a non disclosure agreement, consists of a
  123. X[ccitt implementing] t.30 prom, a document virtually identical to
  124. Xthe    "writefax.man"   document   posted   by   Nick   Pemberton
  125. X[nick@aimed.uucp] in message 8658@aimed.uucp on Dec  8th  '90  in
  126. Xalt.fax  and  other groups and a reprint of the t.4 file compres-
  127. Xsion specs. Nick told me that he  downloaded  the  document  from
  128. XZoom's  bulletin  board.  I enclose Nick's answer, in case you're
  129. Xinterested in that bbs.
  130. X
  131. XI decided to base faxpak on the publicly available  document.   I
  132. Xhave  ignored  as  non existent features offered by the touchbase
  133. X2496 but not mentioned in the public document. If I  ever  wanted
  134. Xto be tied down, I wouldn't use a modem.
  135. X
  136. XApart from that, zooms fax modem is supposed to be selling at $99
  137. X[Direct  Micro,  1-800-288-2887  or  614-771-8771],  which is, as
  138. Xmathemagical minded fellow administraters will observe,  somewhat
  139. Xless  than  the price for the touchbase upgrade alone. JDR Micro-
  140. Xdevices sells a 4800 baud fax modem for about $120. You're  bound
  141. Xto find quite a few more by investing in a copy of Byte.
  142. X
  143. XThe difficulties in getting faxpak to work reliably are the  rea-
  144. Xson  why  faxpak's  output  is limited. Being more concerned with
  145. Xgetting output at all the next stage  obviously  is  getting  the
  146. Xoutput  nicer.  faxpak  currently supports only its default fonts
  147. X[they're enclosed compressed && uuencoded], and hp laserjet  type
  148. Xfonts  [max  30 points], which are scaled to size on the fly [and
  149. Xthey're not pretty at low resolution].
  150. X
  151. XOver the next few weeks I plan to improve on this, and I plan  to
  152. Xclean  up spool.fax.c, which has become somewhat incomprehensible
  153. Xby the last minute addition of the "ftao" string feature  [origi-
  154. Xnally  I  assumed  someone  claiming fax receive capability would
  155. Xhave his own fax machine].
  156. X
  157. Xfaxpak includes source, FaxConfig [which builds char  set  depen-
  158. Xdent   font  sets  for  high  and  low  resolution,  faxconfig.h,
  159. Xfax.config, Makefile, and fax.1].
  160. X
  161. XBecause cnix was down for 6 days I'm going to finish this off  by
  162. Xjust  adding  a  file Howto.Install.  fax.8 pages will be done at
  163. Xsome time in the future - but then, a lot of things will be.
  164. X
  165. XEnjoy.
  166. X
  167. Xklaus
  168. END_OF_FILE
  169.   if test 6969 -ne `wc -c <'Readme'`; then
  170.     echo shar: \"'Readme'\" unpacked with wrong size!
  171.   fi
  172.   # end of 'Readme'
  173. fi
  174. if test -f 'faxhost/faxfonts/diykit.h' -a "${1}" != "-c" ; then 
  175.   echo shar: Will not clobber existing file \"'faxhost/faxfonts/diykit.h'\"
  176. else
  177.   echo shar: Extracting \"'faxhost/faxfonts/diykit.h'\" \(9104 characters\)
  178.   sed "s/^X//" >'faxhost/faxfonts/diykit.h' <<'END_OF_FILE'
  179. X/*
  180. X    diykit.h
  181. X
  182. X    defines names to the bitmaps in diykit.data and
  183. X    where to find a bitmap in data file
  184. X*/
  185. X
  186. X#define    fpc             159    /* f as in ibmpc */
  187. X#define    ptpc            160    /* Pt as in ibmpc */
  188. X#define    invexcl         161    /* inverted ! */
  189. X#define    cent            162    /* cent sign */
  190. X#define    pound           163    /* pound sign */
  191. X#define    currency        164    /* currency sign */
  192. X#define    yen             165    /* yen sign */
  193. X#define    brokenbar       166    /* broken bar */
  194. X#define    paragraph       167    /* paragraph sign */
  195. X#define    diaeresis       168    /* diaeresis */
  196. X#define    copyrite        169    /* copyright sign */
  197. X#define    femordind       170    /* fem. ordinal ind., a_ */
  198. X#define    angledleft      171    /* << */
  199. X#define    not             172    /* not sign, */
  200. X#define    softhyphen      173    /* soft hyphen, same as dash */
  201. X#define    tm              174    /* registered trade mark */
  202. X#define    macron          175    /* macron, high - */
  203. X#define    degree          176    /* degree sign */
  204. X#define    plusminus       177    /* +- */
  205. X#define    sup2            178    /* superscript 2 */
  206. X#define    sup3            179    /* superscript 3 */
  207. X#define    accacute        180    /* accent acute' */
  208. X#define    micro           181    /* micro sign */
  209. X#define    pilcrow         182    /* pilcrow, us paragraph */
  210. X#define    middot          183    /* middle dot, */
  211. X#define    cidilla         184    /* cidilla, */
  212. X#define    sup1            185    /* superscript 1 */
  213. X#define    mascordind      186    /* masc. ordinal ind., a_ */
  214. X#define    angledrite      187    /* >> */
  215. X#define    quarter         188    /* 1/4 */
  216. X#define    half            189    /* 1/2 */
  217. X#define    threequarts     190    /* 3/4 */
  218. X#define    invqu           191    /* inverted ? */
  219. X#define    Agr             192    /* A` */
  220. X#define    Aac             193    /* A' */
  221. X#define    Acirc           194    /* A^ */
  222. X#define    Atilde          195    /* A~ */
  223. X#define    Aumlaut         196    /* A umlaut */
  224. X#define    Aring           197    /* A with ring above */
  225. X#define    AE              198    /* AE */
  226. X#define    Ccidilla        199    /* C cidilla */
  227. X#define    Egr             200    /* E` */
  228. X#define    Eac             201    /* E' */
  229. X#define    Ecirc           202    /* E^ */
  230. X#define    Eumlaut         203    /* E umlaut */
  231. X#define    Igr             204    /* I` */
  232. X#define    Iac             205    /* I' */
  233. X#define    Icirc           206    /* I^ */
  234. X#define    Iumlaut         207    /* I umlaut */
  235. X#define    Eth             208    /* -D */
  236. X#define    Ntilde          209    /* N~ */
  237. X#define    Ogr             210    /* O` */
  238. X#define    Oac             211    /* O' */
  239. X#define    Ocirc           212    /* O^ */
  240. X#define    Otilde          213    /* O~ */
  241. X#define    Oumlaut         214    /* O umlaut */
  242. X#define    multipl         215    /* multiplication */
  243. X#define    Ooblique        216    /* O/ */
  244. X#define    Ugr             217    /* U` */
  245. X#define    Uac             218    /* U' */
  246. X#define    Ucirc           219    /* U^ */
  247. X#define    Uumlaut         220    /* U umlaut */
  248. X#define    Yac             221    /* Y' */
  249. X#define    Thorn           222    /* cap. icelandic thorn */
  250. X#define    germss          223    /* small german letter sharp 's' */
  251. X#define    agr             224    /* a` */
  252. X#define    aac             225    /* a' */
  253. X#define    acirc           226    /* a^ */
  254. X#define    atidle          227    /* a~ */
  255. X#define    aumlaut         228    /* a umlaut */
  256. X#define    adot            229    /* a dot */
  257. X#define    ae              230    /* ae */
  258. X#define    ccidilla        231    /* c cidilla */
  259. X#define    egr             232    /* e` */
  260. X#define    eac             233    /* e' */
  261. X#define    ecirc           234    /* e^ */
  262. X#define    eumlaut         235    /* e umlaut */
  263. X#define    igr             236    /* i` */
  264. X#define    iac             237    /* i' */
  265. X#define    icirc           238    /* i^ */
  266. X#define    iumlaut         239    /* i umlaut */
  267. X#define    eth             240    /* small icelandic eth */
  268. X#define    ntilde          241    /* n~ */
  269. X#define    ogr             242    /* o` */
  270. X#define    oac             243    /* o' */
  271. X#define    ocirc           244    /* o^ */
  272. X#define    otilde          245    /* o~ */
  273. X#define    oumlaut         246    /* o umlaut */
  274. X#define    div             247    /* division sign */
  275. X#define    ooblique        248    /* o/ */
  276. X#define    ugr             249    /* u` */
  277. X#define    uac             250    /* u' */
  278. X#define    ucirc           251    /* u^ */
  279. X#define    uumlaut         252    /* u umlaut */
  280. X#define    yac             253    /* y' */
  281. X#define    thorn           254    /* thorn */
  282. X#define    yumlaut         255    /* y umlaut */
  283. X
  284. X
  285. X/* sorted [by name] struct for bsearch, probably not the most efficient
  286. X   way to do him, but then, how often are we going to need this.
  287. X*/
  288. X
  289. Xstruct    DIY
  290. X{
  291. X    char    *charname;
  292. X    int    chardef;
  293. X} diy[] =
  294. X{
  295. X    "AE",           AE,                 /* AE */
  296. X    "Aac",          Aac,                /* A' */
  297. X    "Acirc",        Acirc,              /* A^ */
  298. X    "Agr",          Agr,                /* A` */
  299. X    "Aring",        Aring,              /* A with ring above */
  300. X    "Atilde",       Atilde,             /* A~ */
  301. X    "Aumlaut",      Aumlaut,            /* A umlaut */
  302. X    "Ccidilla",     Ccidilla,           /* C cidilla */
  303. X    "Eac",          Eac,                /* E' */
  304. X    "Ecirc",        Ecirc,              /* E^ */
  305. X    "Egr",          Egr,                /* E` */
  306. X    "Eth",          Eth,                /* -D */
  307. X    "Eumlaut",      Eumlaut,            /* E umlaut */
  308. X    "Iac",          Iac,                /* I' */
  309. X    "Icirc",        Icirc,              /* I^ */
  310. X    "Igr",          Igr,                /* I` */
  311. X    "Iumlaut",      Iumlaut,            /* I umlaut */
  312. X    "Ntilde",       Ntilde,             /* N~ */
  313. X    "Oac",          Oac,                /* O' */
  314. X    "Ocirc",        Ocirc,              /* O^ */
  315. X    "Ogr",          Ogr,                /* O` */
  316. X    "Ooblique",     Ooblique,           /* O/ */
  317. X    "Otilde",       Otilde,             /* O~ */
  318. X    "Oumlaut",      Oumlaut,            /* O umlaut */
  319. X    "Thorn",        Thorn,              /* cap. icelandic thorn */
  320. X    "Uac",          Uac,                /* U' */
  321. X    "Ucirc",        Ucirc,              /* U^ */
  322. X    "Ugr",          Ugr,                /* U` */
  323. X    "Uumlaut",      Uumlaut,            /* U umlaut */
  324. X    "Yac",          Yac,                /* Y' */
  325. X    "aac",          aac,                /* a' */
  326. X    "accacute",     accacute,           /* accent acute' */
  327. X    "acirc",        acirc,              /* a^ */
  328. X    "adot",         adot,               /* a dot */
  329. X    "ae",           ae,                 /* ae */
  330. X    "agr",          agr,                /* a` */
  331. X    "angledleft",   angledleft,         /* << */
  332. X    "angledrite",   angledrite,         /* >> */
  333. X    "atidle",       atidle,             /* a~ */
  334. X    "aumlaut",      aumlaut,            /* a umlaut */
  335. X    "brokenbar",    brokenbar,          /* broken bar */
  336. X    "ccidilla",     ccidilla,           /* c cidilla */
  337. X    "cent",         cent,               /* cent sign */
  338. X    "cidilla",      cidilla,            /* cidilla, */
  339. X    "copyrite",     copyrite,           /* copyright sign */
  340. X    "currency",     currency,           /* currency sign */
  341. X    "degree",       degree,             /* degree sign */
  342. X    "diaeresis",    diaeresis,          /* diaeresis */
  343. X    "div",          div,                /* division sign */
  344. X    "eac",          eac,                /* e' */
  345. X    "ecirc",        ecirc,              /* e^ */
  346. X    "egr",          egr,                /* e` */
  347. X    "eth",          eth,                /* small icelandic eth */
  348. X    "eumlaut",      eumlaut,            /* e umlaut */
  349. X    "femordind",    femordind,          /* fem. ordinal ind., a_ */
  350. X    "fpc",          fpc,                /* f as in ibmpc */
  351. X    "germss",       germss,             /* small german letter sharp 's' */
  352. X    "half",         half,               /* 1/2 */
  353. X    "iac",          iac,                /* i' */
  354. X    "icirc",        icirc,              /* i^ */
  355. X    "igr",          igr,                /* i` */
  356. X    "invexcl",      invexcl,            /* inverted ! */
  357. X    "invqu",        invqu,              /* inverted ? */
  358. X    "iumlaut",      iumlaut,            /* i umlaut */
  359. X    "macron",       macron,             /* macron, high - */
  360. X    "mascordind",   mascordind,         /* masc. ordinal ind., a_ */
  361. X    "micro",        micro,              /* micro sign */
  362. X    "middot",       middot,             /* middle dot, */
  363. X    "multipl",      multipl,            /* multiplication */
  364. X    "not",          not,                /* not sign, */
  365. X    "ntilde",       ntilde,             /* n~ */
  366. X    "oac",          oac,                /* o' */
  367. X    "ocirc",        ocirc,              /* o^ */
  368. X    "ogr",          ogr,                /* o` */
  369. X    "ooblique",     ooblique,           /* o/ */
  370. X    "otilde",       otilde,             /* o~ */
  371. X    "oumlaut",      oumlaut,            /* o umlaut */
  372. X    "paragraph",    paragraph,          /* paragraph sign */
  373. X    "pilcrow",      pilcrow,            /* pilcrow, us paragraph */
  374. X    "plusminus",    plusminus,          /* +- */
  375. X    "pound",        pound,              /* pound sign */
  376. X    "ptpc",         ptpc,               /* Pt as in ibmpc */
  377. X    "quarter",      quarter,            /* 1/4 */
  378. X    "softhyphen",   softhyphen,         /* soft hyphen, same as dash */
  379. X    "sup1",         sup1,               /* superscript 1 */
  380. X    "sup2",         sup2,               /* superscript 2 */
  381. X    "sup3",         sup3,               /* superscript 3 */
  382. X    "thorn",        thorn,              /* thorn */
  383. X    "threequarts",  threequarts,        /* 3/4 */
  384. X    "tm",           tm,                 /* registered trade mark */
  385. X    "uac",          uac,                /* u' */
  386. X    "ucirc",        ucirc,              /* u^ */
  387. X    "ugr",          ugr,                /* u` */
  388. X    "uumlaut",      uumlaut,            /* u umlaut */
  389. X    "yac",          yac,                /* y' */
  390. X    "yen",          yen,                /* yen sign */
  391. X    "yumlaut",      yumlaut                /* y umlaut */
  392. X};
  393. X
  394. X#define    MAX_DEF    sizeof(diy)/(sizeof(struct DIY))
  395. END_OF_FILE
  396.   if test 9104 -ne `wc -c <'faxhost/faxfonts/diykit.h'`; then
  397.     echo shar: \"'faxhost/faxfonts/diykit.h'\" unpacked with wrong size!
  398.   fi
  399.   # end of 'faxhost/faxfonts/diykit.h'
  400. fi
  401. if test -f 'faxhost/faxfonts/hires.uue' -a "${1}" != "-c" ; then 
  402.   echo shar: Will not clobber existing file \"'faxhost/faxfonts/hires.uue'\"
  403. else
  404.   echo shar: Extracting \"'faxhost/faxfonts/hires.uue'\" \(6635 characters\)
  405.   sed "s/^X//" >'faxhost/faxfonts/hires.uue' <<'END_OF_FILE'
  406. Xbegin 640 hires.data.Z
  407. XM'YV09O @@0%CQ@P "!,J7 A@0,.'#B-"G"@Q  "+"B5*9(B0X P:'$,"P "#
  408. XM) XX)TFJ+,F2) 00+T7*7.BQQDR&S  P"X")YP 8/S_P$VH 3%$&P)#^@;<T
  409. XM R"G!P^: 3 UI$<;-Y$B_0#N!SPVV, R&\N,#3"S/H!Q;0"/ 3Y&S."2+1L6
  410. XMFU>N6H$I]'A#(8( # 9X.#!XAH,9'L+P4QP&4^,9!6%X #.9 3;+ ?AE'F"&
  411. XMLX%AGQD,$XW!3&D8/%"/! #!(XZ;"CT ^ %@#J PMW.' !0#$&W9/ #P 6 .
  412. XM@#$ P\ D#P8L&* QSX'Y@,,!QMZ".6 G' "(N_?NX+];Q*@=-D$:ULL#T LL
  413. XM "#W&A\: #"_/OW[]N,[=.]^_?KS,:B7WT/\O6>@?^PAJ&![!A8HD7WGR7!3
  414. XM@1E@4F$#L&!X #@;_L"/AQMNB"&&%598H'KG':1>0@6VV*"!'GKHXHP'<G0>
  415. XM2"OF&%( [27HXXD)G6>3CNI]@(^12.)#Y'E8$>DD0]]]9Q4,-/2%(@#6@0& 
  416. XME@D" L"+$@D @)CV,0" F1BL-B4-KY5W # /@,,!'"2U! 8#=^:)YYYZMD32
  417. XMG'&^N69VY7T B*$T)OJBBTDF.64-Z6D7YP?P\( ##AC L2<(9G(  !X!P#, 
  418. XM, < @B:6#,# P!_\L(H2&)'2!$,- 9;WP%#\6'HI '    Y\W>$S@))FIFH 
  419. XM# 9H2MVE/.!!:9R/2JA>IP $-QP[ 3 S ",',.   QPP@ ,#FM[YAS_GGGOF
  420. XMNL4^JJ)V/^ 3+PP(T!L" ", XU6\.*3F:;NI!HP#!_$:^0 \&SZ*HW9OQCDG
  421. XM!I>2A$!O<P"SU%)XX( '20*+"RX&'N!P\,$# ,$0034,J=T9AKSA#![\P,$'
  422. XM&*^]UFNOX/C*(X_?'0" SPX $+2GGC[:I*3@4'II2RU=&B^_.)2DYYW4X<%#
  423. XML\_F;..L5DJJ%C@G$00&!F/K634?/[#S04[%CDTG02=Q]8!>6]?0YI,9402;
  424. XM?B*A3"C>V^E]$]\/WD>0#;$"OE#.X'R7'WB^1C[3X;4JOA!77"F$N=8Y'BZM
  425. XMY0H%';24['TGNGDPV/#NWJ2"XX"F)6$@>[U8;FD[>T B1..4-BP,VP'P/(#/
  426. XMN*J&8<P8YA@C 3$2,".#\\R8P(P999'#QAGZS*")R!QX(#SPO*L,FX/ C%K4
  427. XM^4;=J>KZJ2:)*:;448>/#_/S?C1L?X"S%-,!M[0O//QCGZK^@ \"7HQSLK)!
  428. XMUWZ'C >@@P,;BYI*0(  "FKI@@@ 0P;W!(/J<(!9S@H> J]C@[OASV+@@ $<
  429. XM"!) 8R'KA<?J7ZHX8$"FZ(]N)TO=W_#7*GX(L'^P L,/NI+"(/YP@#UD%:NF
  430. XM=(/$S42)/I3A^H(XQ"'"P(BULXYUAL-%X?0-!C>H'&P>@(P/H*-9EZ(3'#*8
  431. XMP2V!  QO] $8Y,A!E8#0C&1DXN=@@P</]/&(,HQ1% &IJCX:TH^RV=H-5G>3
  432. XM_Q%.;X]TR/_^QT3?W>0 _,!D%C>I14YB:84K9"$,3L*#I,')2XH4WTWP  ]6
  433. XM7O&5P( !,'K3FX/TY0?Z @8.P)9"4&;LEQ L6@YO<+^;^ $ Q^RD,CVIS'HY
  434. XM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G$)=5FF?EL>A%'=\;&9HIF9$
  498. XM_)QP?+ )"[1-=\@$X66+K,=Q1P-P ,F 3,38"0 >  2GK % H,H;T+B';,>*
  499. XMK#2-+%6@+,J2[+DR0+5)B[$7JSE:ID)WW,FS'$2U_,>W++TRH'(%>[ (  C-
  500. XM?+ ^PQ"O# ?!+,N91LRA;,P""QE%%C(_P =G8 YC8 P!8 @!X @_@"[\$ >Y
  501. XM,<YS8 [D=37;3*,KHL6&1FFH8EF8A<(X*F/E.@.K61$]\F]9C&KW'#""U$E/
  502. XM+&O;C,4XS!WV4="%5F[LD]"N1E*QA@^-YKD?,2$]DG_Y-\82O<6EA="LIM"7
  503. XMQ0,,3:\S0+T)P<+Z:)<&3=$F[2$HS9DKS='/^3C<H2 )(8[BV);T9J8^*;TS
  504. XM4,H(XCCWH1! K9Q#W2@HQ]&SZL&EFR=9G)Q";2!0;23;/*V[K+29+')1AGQC
  505. XM;1%0*[#H(1,0  0*>TKBV,H;D$*])  XP(X/P V^B@%\0%JRL[A9,Z0R4:XT
  506. XM0,\.  2%K0! @-@+  R+K;%,/$J0C70[]W-!1Z\TL)H\'<#'"U$/0Q"275J 
  507. XMPIB6[=#$"1X1#6^<_39PF'$=Q+AH'914G116C=HU=72K'3NMS71H?9R"2J@@
  508. XM4 "_#0X%@$#(J]J?K72Z;=GE^]+&6[Q9G-JVC73(+=J>6R5%=GP6 9(@"62\
  509. XM&=@RP"9.TBXJ=0!W%U)JI+[8$ .8H-YK"#*2L9AS@YI:]-T"*M \0M )$7NR
  510. XM1WLB]3[!A'N<\ #M][*0,B$&0LCKHA#ZS=_FYM^V!^ ',.!22RN#8]H?/-L(
  511. XML> ,?F[_G7L"+K UL)I&BKD*'GL;WM<0T^$!+N$=(0,U0-JP!=%+G1#RYP'T
  512. XM9V=C#-),VB/^]QP < 8 ,(!8XN)!J1#!$1QQ9J:T)\4.%^1./I<N[M((,<8B
  513. X63>/R9.->5W\YKG\[SB,]#H!WX.2> A#!
  514. Xend
  515. END_OF_FILE
  516.   if test 6635 -ne `wc -c <'faxhost/faxfonts/hires.uue'`; then
  517.     echo shar: \"'faxhost/faxfonts/hires.uue'\" unpacked with wrong size!
  518.   fi
  519.   # end of 'faxhost/faxfonts/hires.uue'
  520. fi
  521. if test -f 'faxhost/faxfonts/lores.uue' -a "${1}" != "-c" ; then 
  522.   echo shar: Will not clobber existing file \"'faxhost/faxfonts/lores.uue'\"
  523. else
  524.   echo shar: Extracting \"'faxhost/faxfonts/lores.uue'\" \(4403 characters\)
  525.   sed "s/^X//" >'faxhost/faxfonts/lores.uue' <<'END_OF_FILE'
  526. Xbegin 640 lores.data.Z
  527. XM'YV09O P@0%CQ@P "!,B' " H<.&$ ,D?*B0X P:"A5B@($#SL:/,"" R$@2
  528. XM@,4:)1$R"X!I (P/_ R 80#L#[P,@ Z:R6C1!DF:/^"QP<:,&1M@/\ UP,>H
  529. XMJ%%L06DBM'@#(8,!'@[,\!"&7QA,,V!XF(DM +\!9@P,8S ,@QD8/ !L+(B#
  530. XMI \ 8P $ 10&T @ =_F , -F&)A@P,8 \P%G:L$<*0< DDP9D,24) G2@($9
  531. XM6(#)$ T $$T:(L// (!ICI%2]&G+@%++!I;Z\V>&HC7+(/DY Z8&L Z ^\%/
  532. XM.'#?J$MJ/HC9-NS/Q)T[KPB#!D;,V!$&H,T]N6:4V4E^P#<>NV:?X;-7IDZC
  533. XM:DK.8&3#9BA@-  &<GE6KUOR 3@.<," P4P$,C"3@ #ZQQYD)7WPW(/2 3)>
  534. XM>0D15 -G#<*# PYX,  #?O@<  P')C'P!S]\\.=8#:PUR \/=<%#&3[WP6  
  535. XM' S J&"%,-2P6TKXQ<7. (PXP  .)OKSAS_W-<EC#<R1] ,^," P B!3PD"B
  536. XMAT=R,)YPU-5P'4G^<8 '#AC, (A->&QT) ,<8/  / $ L2)X)+WA#![\@%%7
  537. XM8^!L)]D! #@  (EAHB>>AC@(*&"6 QK( !]\? !/F.Z1"0P/\( 1*1P\_,#.
  538. XM?1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II&2,WA(DYF5%T[_Q 7CG/TD!G30^LM*FBVJ'(4]<P3 ^N19+LQ=1*C
  571. XMVTD^7?&  X4->, =X"5WY)BK.+!UV^#! U 1S&@J[.8 =36HV=(96?7.KRI)
  572. XM&1N+\WN$(X70!TU);QRX,-T'9HA,5<EOT9;D;P[ P0 8$/._C7M#"JD+ @" 
  573. XM  P@  <^0 , D!$ 1 P ;SO'. ZVJ',((  ?"6 $'T 4 &$$0'Q@1J.41H. 
  574. XM0 <!%7]  @>0SO.RI[J/(94Q0M9\*(Y@0'8BZJ8B$>(K;O$+VS4\T'C0A(>Q
  575. XM'ZR@.8C2=N4826OAW88>VKO__"[WZ_!+)G<'ATRPE7B!]9T??^=J#L!S ! 4
  576. XMP//>,KSD\UYYOC/^GJ]42+8C/WD<!<STF)>[>_ ^QLG N_6E7WSL44_, _R#
  577. XM <$ /@.8 50,,.,'P8!!,/#PCSRT$O5+Q9C&,, QCX%,2UT+5&QZ=EP,X8=0
  578. XMGSF1T71VOY[%#&A[G,IQ6_29= - _  C?^+.SU[UP^!'A&H (#!0DYO%'VD^
  579. XM<R+U9Q+'Q1PT(17OYW\Y X#TEWX$.%'VX2Q((2/\]39RXVS'A2<6)QIN4X%Q
  580. XM P]S4R''A1X,@7(=>%0/<8$5<5SN<8""<X(>R! J*((<<3WWXR;_P$\ZB#,<
  581. XM(#-E=5PU\P 0D  P$ ?ND#N[TSN_$SS#4SPC@SP$6%5- G[ T#QX\#R*)BG2
  582. XMLT(KZ%6[8BV$8H58"#T-,ST_>%8+ 0BR92!BF#Y9N(4A-%W,(80;  /;T89D
  583. XMN#5FV(77(5NRA1!XF(5ZR(4B& /0=A\,8  8X!+O51N\8B/7U86P1%8C@P/8
  584. XM  9!Q ACP !BL#M<@P,)58CN47? ,&8F!#!'DD*$J'[UEA ;N#0^<(H^@T(J
  585. XM%(>WE89K" :FB(HGI(IQ>%QT!P8R@1"[*(NI6(L_.%VN""VPZ$5@! =BY"V?
  586. XM4488*%XI4W;8HSV$-AZY-E=8IWXR4&3_L2$-@TXSQ$_&$ /,P ^^=G\R<$'?
  587. XM%TD(D4N[I"&)\TO!M((R,$+MIV_TR$OW"$S")((R<'( H'_\-X]]5H^]Q#,"
  588. XMJ8\\Y % H % L $ON)  Z4L/29")!@P(^(_VJ)'Y2) U0R@(  @G22@*J4L9
  589. XMZ9 CJ7YAH2MG-@;&$ "&L"1]09-GMH(S0%TDL6,;,4E QDV_<G\SL$BG01N+
  590. XM-B>PE25R44_M&(X']8J .&@?XI2$9D\P.4JS)8P8PI1N@I50R9.,E6U5V93S
  591. XME)51.0,N1(J *'*?,2%K>4M4^4=P*2'DL9:UTRL>N6@A%R%RR9-+Y8+&(DL2
  592. XM<9BG!H(8N!D* 0% P'\/  @;<#^\@@,.P W^PSWP$'<\\8Y^Y ! H ! L ""
  593. XMLS"-@E4"HE4K2 .+Y);R,R(M(U8;$8<T,)6]DA!@%9MC19L7Q)<&HD^PJ6(R
  594. XM1)L@YWF>!RRY*9RS^8,TH&#](CC)B57+N9HN-RN6 0"68BD<EQGOV%I6(1<[
  595. XM%B ]!A9O1U8'=W\TL$5)R2U.5%JFA5JJM8(7$F.$(E2D95JG53#Q*8(LTBIJ
  596. XMV)?MB9_9HY^KQ9]HI6@!BI_P6:#J!R4E49?655@8D%V#UUW?18!BDA)Q@4SX
  597. X7L%'<F!^9QY]E^3+$^$P22J'<!0C>%1<E
  598. Xend
  599. END_OF_FILE
  600.   if test 4403 -ne `wc -c <'faxhost/faxfonts/lores.uue'`; then
  601.     echo shar: \"'faxhost/faxfonts/lores.uue'\" unpacked with wrong size!
  602.   fi
  603.   # end of 'faxhost/faxfonts/lores.uue'
  604. fi
  605. if test -f 'faxhost/fntwrite.c' -a "${1}" != "-c" ; then 
  606.   echo shar: Will not clobber existing file \"'faxhost/fntwrite.c'\"
  607. else
  608.   echo shar: Extracting \"'faxhost/fntwrite.c'\" \(11391 characters\)
  609.   sed "s/^X//" >'faxhost/fntwrite.c' <<'END_OF_FILE'
  610. X#include <stdio.h>
  611. X#include <malloc.h>
  612. X#include <ctype.h>
  613. X
  614. X#include "../faxconfig.h"
  615. X
  616. X/*
  617. X    fntwrite.c
  618. X
  619. X    very preliminary kit to do text -> pbm.
  620. X
  621. X    currently uses some stuff I ripped off [my own] chartpak.
  622. X    knows about hpljet fonts, uses diy font to construct bitmap,
  623. X    doesn't know anything about faxing, however.
  624. X
  625. X    first released version 0.99 [desperado version]
  626. X    cleaned up Dec 18nd, '90
  627. X    Copyright (C) 1990, klaus schallhorn, klaus@cnix.uucp
  628. X
  629. X    Permission to use, copy, modify, and distribute this software 
  630. X    and its documentation for any purpose and without fee is hereby 
  631. X    granted, provided that the above copyright notice appear in 
  632. X    all copies and that both that copyright notice and this permission 
  633. X    notice appear in supporting documentation. 
  634. X
  635. X    This software is provided "as is" without express or implied warranty.
  636. X*/
  637. X
  638. X#ifndef    MAX_HITE
  639. X#define    MAX_HITE    3600    /* 12 in @ 300 dpi */
  640. X#endif
  641. X
  642. Xextern    FILE *outfp;
  643. X
  644. X#define    ESC        '\033'
  645. X#define    setpix(y,x)    (block[y][x>>3] |= bit[x&7])
  646. X
  647. Xstatic    unsigned char *block[MAX_HITE];
  648. Xstatic    int cols, lines, max_ln, max_col, xmax_used, ymax_used, font_hite, 
  649. X    spacelen, tablen, curX, curY;
  650. Xint    font_type, bm_len;
  651. X
  652. Xstatic    int x204[2700], y196[MAX_HITE], y97[MAX_HITE], *yptr;
  653. Xextern    int fax_mode;
  654. X
  655. Xextern    char *PGM;
  656. X
  657. Xstatic    unsigned char bit[] =
  658. X{
  659. X    0x80,
  660. X    0x40,
  661. X    0x20,
  662. X    0x10,
  663. X    0x08,
  664. X    0x04,
  665. X    0x02,
  666. X    0x01
  667. X};
  668. X
  669. Xstruct    fd    /* hp laserjet font header, fonts <= 30 pts/ old laserjet plus */
  670. X{        /* I don't have enough data on how fonts > 30 pts are done. */
  671. X        /* 4.2.91: have now, will add this later */
  672. X    unsigned char    null, one;
  673. X    unsigned char    two;
  674. X    unsigned char    fon_type;
  675. X    unsigned char    four, five;
  676. X    unsigned char    msb_base, base_line;
  677. X    unsigned char    eigth, cell_width;
  678. X    unsigned char    msb_cell_hite, cell_hite;
  679. X    unsigned char    orient;
  680. X    unsigned char    spacing;
  681. X    unsigned char    symbol, set;
  682. X    unsigned char    msb_pitch, pitch;
  683. X    unsigned char    msb_hite, hite;
  684. X    unsigned char    tw, twone;
  685. X    unsigned char    twtwo;
  686. X    unsigned char    style;
  687. X    unsigned char    stroke;
  688. X    unsigned char    type_face;
  689. X} fdata;
  690. X
  691. Xstruct    cd    /* char header for same */
  692. X{
  693. X    unsigned char     null,
  694. X            one,
  695. X            two,
  696. X            three,
  697. X            orient,
  698. X            five;
  699. X    unsigned char    msb_l_offset, l_offset;
  700. X    unsigned char    msb_t_offset, t_offset;
  701. X    unsigned char    msb_width, width;
  702. X    unsigned char    msb_hite, hite;
  703. X    unsigned char    msb_delta, delta;
  704. X} cdata;
  705. X
  706. Xstruct    FNT_BITMAP    /* one for each char */
  707. X{
  708. X    short len, hite, clen, toffs, loffs;
  709. X    unsigned char **CH;
  710. X    short *SH;
  711. X} font[256];
  712. X
  713. Xint    (*prt_func)();    /* function to copy a character bitmap */
  714. Xint    prt_bmchr(), prt_hpchr();
  715. X
  716. Xfont_init(name)
  717. Xchar *name;
  718. X{
  719. X    FILE *hp;
  720. X    int i, *Yptr;
  721. X    char tmp[4];
  722. X
  723. X    struct FNT_BITMAP *cf;
  724. X    double x, dpi;
  725. X
  726. X    for (i=0; i<256; i++)    /* just to be safe */
  727. X    {
  728. X        cf = &font[i];
  729. X        cf->CH = (unsigned char **)NULL;
  730. X        cf->SH = (short *)NULL;
  731. X        cf->len = cf->hite = cf->clen = cf->toffs = 0;
  732. X    }
  733. X
  734. X    if ((hp = fopen(name, "r")) == NULL)
  735. X    {
  736. X        fprintf(stderr,"%s: can't open %s font\n",PGM,name);
  737. X        return(ERROR);
  738. X    }
  739. X
  740. X    if (fread(tmp, sizeof(char), 3, hp) != 3)
  741. X    {
  742. X        fprintf(stderr,"%s: can't read fontfile %s\n",PGM,name);
  743. X        return(ERROR);
  744. X    }
  745. X    if (!strncmp(tmp, "fxL", 3))
  746. X    {
  747. X        font_type = COARSE;
  748. X        bm_len = 16;
  749. X        prt_func = prt_bmchr;
  750. X        i = rd_bmfont(hp);
  751. X    }
  752. X    else if (!strncmp(tmp, "fxH", 3))
  753. X    {
  754. X        font_type = FINE;
  755. X        prt_func = prt_bmchr;
  756. X        bm_len = 32;
  757. X        i = rd_bmfont(hp);
  758. X    }
  759. X    else if (!strncmp(tmp, "\033)s", 3))
  760. X    {
  761. X        font_type = HP;
  762. X        prt_func = prt_hpchr;
  763. X        i = rd_hpfont(hp);
  764. X    }
  765. X    else
  766. X    {
  767. X        fprintf(stderr,"%s: header doesn't look like a font: %02x%02x%02x\n",
  768. X            tmp[0],tmp[1],tmp[2]);
  769. X        return(ERROR);
  770. X    }
  771. X
  772. X    if (i)
  773. X        return(ERROR);
  774. X
  775. X    fclose(hp);
  776. X
  777. X    if (font_type == HP)
  778. X    {
  779. X        for (i=1; i<2700; i++)
  780. X        {
  781. X            x = (double)i * 204.15;
  782. X            x /= 300.0;
  783. X            x204[i] = (int)x;
  784. X        }
  785. X        if (fax_mode == 1)
  786. X        {
  787. X            Yptr = yptr = y97;
  788. X            dpi = 97.79;
  789. X        }
  790. X        else    
  791. X        {
  792. X            Yptr = yptr = y196;
  793. X            dpi = 195.58;
  794. X        }
  795. X        for (i=1; i<MAX_HITE; i++)
  796. X        {
  797. X            x = (double)i * dpi;
  798. X            x /= 300.0;
  799. X            *Yptr++ = (int)x;
  800. X        }
  801. X    }
  802. X    return(0);
  803. X}
  804. X
  805. Xmk_bm(x,y)
  806. Xint x,y;
  807. X{
  808. X    int i;
  809. X
  810. X    if (x%32)            /* set to 32bit/4byte boundary */
  811. X        x = x+32-(x%32);
  812. X    x /= 8;
  813. X
  814. X    for (i=0; i<y; i++)
  815. X    {
  816. X        if ((block[i] = (unsigned char *)calloc(x,sizeof(unsigned char))) == NULL)
  817. X        {
  818. X            fprintf(stderr,"%s: not enough memory\n",PGM);
  819. X            return(ERROR);
  820. X        }
  821. X    }
  822. X
  823. X    for (; i<MAX_HITE; i++)
  824. X        block[i] = NULL;
  825. X
  826. X    cols = x;
  827. X    lines = y;
  828. X    max_ln = lines-1;
  829. X    max_col = (cols*8)-1;
  830. X    return(0);
  831. X}
  832. X
  833. Xend_bm()
  834. X{
  835. X    int i, j;
  836. X    extern char tname[];
  837. X
  838. X    ymax_used = min(ymax_used+4, MAX_HITE);
  839. X
  840. X    if (fprintf(outfp,"P4\n%d\n%d\n",(xmax_used*8),ymax_used) == EOF)
  841. X    {
  842. X        fprintf(stderr,"%s: can't init pbmfile %s\n",PGM,tname);
  843. X        return(ERROR);
  844. X    }
  845. X    for (i=0; i<ymax_used; i++)
  846. X    {
  847. X        if ((j = fwrite(block[i], 1, xmax_used, outfp)) != xmax_used)
  848. X        {
  849. X            fprintf(stderr,"%s: premature EOF after %d bytes of %d, line %d of %d\n",
  850. X                PGM,j,xmax_used,i,ymax_used);
  851. X            return(ERROR);
  852. X        }
  853. X        (void)memset(block[i], '\0', xmax_used);
  854. X    }
  855. X    return(0);
  856. X}
  857. X
  858. Xrd_hpfont(hp)
  859. XFILE *hp;
  860. X{
  861. X    struct FNT_BITMAP *cf;
  862. X    int cur_char, c, i, j, len, hite;
  863. X    char nbuf[80];
  864. X
  865. X    i = 0;
  866. X    while (isdigit(c = getc(hp)))
  867. X        nbuf[i++] = c;
  868. X    nbuf[i] = '\0';
  869. X    i = atoi(nbuf);
  870. X    if (c != 'W')
  871. X    {
  872. X        fprintf(stderr,"%s: font garbled (W) ?\n",PGM);
  873. X        return(ERROR);
  874. X    }
  875. X    if (fread(&fdata, 26, 1, hp) != 1)
  876. X    {
  877. X        fprintf(stderr,"%s: font garbled (fread fdata) ?\n",PGM);
  878. X        return(ERROR);
  879. X    }
  880. X
  881. X    for (j=26; j<i; j++)
  882. X        c = getc(hp);
  883. X    spacelen = ((fdata.msb_pitch * 256) + fdata.pitch) / 4;
  884. X
  885. X/* loop through font until eof */
  886. X
  887. X    for (cur_char = 32; cur_char<256; )
  888. X    {
  889. X        if ((c = getc(hp)) != ESC)
  890. X        {
  891. X                /* some fonts have strange garbage at the beginning */
  892. X                /* find a possible sync */
  893. X            if (cur_char == ' ')
  894. X            {
  895. X                while ((c = getc(hp)) != EOF)
  896. X                    if (c == ESC)
  897. X                        break;
  898. X                if (c == EOF)
  899. X                    break;
  900. X                continue;
  901. X            }
  902. X            break;
  903. X        }
  904. X        if ((c = getc(hp)) != '*')
  905. X        {
  906. X            fprintf(stderr,"%s: no '*' at char %d\n",PGM,cur_char);
  907. X            return(ERROR);
  908. X        }
  909. X        if ((c = getc(hp)) != 'c')
  910. X        {
  911. X            fprintf(stderr,"%s: no 'c' at char %d\n",PGM,cur_char);
  912. X            return(ERROR);
  913. X        }
  914. X
  915. X        i=0;
  916. X        while (isdigit(c = getc(hp)))
  917. X            nbuf[i++] = c;
  918. X        nbuf[i] = '\0';
  919. X        i = atoi(nbuf);
  920. X        if (c != 'E' || i < cur_char)
  921. X        {
  922. X            fprintf(stderr,"%s: no E at char %d [%d]\n",PGM,cur_char,i);
  923. X            return(ERROR);
  924. X        }
  925. X        cur_char = i;
  926. X        cf = &font[cur_char];
  927. X        if ((c = getc(hp)) != ESC)
  928. X        {
  929. X            fprintf(stderr,"%s: no ESC for char descr %d\n",PGM,cur_char);
  930. X            return(ERROR);
  931. X        }
  932. X        if ((c = getc(hp)) != '(')
  933. X        {
  934. X            fprintf(stderr,"%s: no '(' at char %d\n",PGM,cur_char);
  935. X            return(ERROR);
  936. X        }
  937. X        if ((c = getc(hp)) != 's')
  938. X        {
  939. X            fprintf(stderr,"%s: no 's' at char %d\n",PGM,cur_char);
  940. X            return(ERROR);
  941. X        }
  942. X
  943. X        i=0;
  944. X        while (isdigit(c = getc(hp)))
  945. X            nbuf[i++] = c;
  946. X        nbuf[i] = '\0';
  947. X        i = atoi(nbuf);
  948. X        if (c != 'W')
  949. X        {
  950. X            fprintf(stderr,"%s: no W after char descr width at char %d\n",PGM,cur_char);
  951. X            return(ERROR);
  952. X        }
  953. X        if (fread(&cdata, 16, 1, hp) != 1)
  954. X        {
  955. X            fprintf(stderr,"%s: font garbled (fread cdata) at char %d\n",PGM,cur_char);
  956. X            return(ERROR);
  957. X        }
  958. X
  959. X        len = (cdata.msb_width * 256) + cdata.width;
  960. X        if (len%8)
  961. X            len = len/8 + 1;
  962. X        else len /= 8;
  963. X        cf->len = len;
  964. X
  965. X        hite = (cdata.msb_hite * 256) + cdata.hite;
  966. X        cf->hite = hite;
  967. X        if (cf->hite > 128)
  968. X        {
  969. X            fprintf(stderr,"%s: wrong fonthite char %03d, hite %d\n",
  970. X                PGM,cur_char,cf->hite);
  971. X            return(ERROR);
  972. X        }
  973. X
  974. X        cf->clen = 
  975. X            ((cdata.msb_delta * 256) + cdata.delta) / 4;
  976. X
  977. X        cf->toffs = 
  978. X            (cdata.msb_t_offset * 256) + cdata.t_offset;
  979. X
  980. X        cf->loffs = 
  981. X            (cdata.msb_l_offset * 256) + cdata.l_offset;
  982. X
  983. X        if ((cf->CH = (unsigned char **)malloc(hite * sizeof(unsigned char *))) == (unsigned char **)NULL)
  984. X        {
  985. X            fprintf(stderr,"%s: not enough memory for bitmap array char %d\n",
  986. X                PGM,cur_char);
  987. X            return(ERROR);
  988. X        }
  989. X
  990. X        for (i=0; i<hite; i++)
  991. X        {
  992. X            if ((cf->CH[i] = (unsigned char *)malloc(len)) == NULL)
  993. X            {
  994. X                fprintf(stderr,"%s: not enough memory for bitmap at char %d\n",
  995. X                    PGM,cur_char);
  996. X                return(ERROR);
  997. X            }
  998. X            if (fread(cf->CH[i], len, 1, hp) != 1)
  999. X            {
  1000. X                fprintf(stderr,"%s: can't fread char bitmap at char %d, hite %d\n",
  1001. X                    PGM,cur_char,i);
  1002. X                return(ERROR);
  1003. X            }
  1004. X        }
  1005. X    }
  1006. X    font_hite = fnthite();
  1007. X    tablen = 8*spacelen;
  1008. X    return(0);
  1009. X}
  1010. Xrd_bmfont(fp)
  1011. XFILE *fp;
  1012. X{
  1013. X    int i, lastc;
  1014. X    struct FNT_BITMAP *cf;
  1015. X    short cur_char;
  1016. X
  1017. X    for (cur_char=0;;)
  1018. X    {
  1019. X        lastc = cur_char;
  1020. X        if ((i = fread(&cur_char, sizeof(short), 1, fp)) != 1)
  1021. X        {
  1022. X            if (cur_char > 0x7e && (!i))
  1023. X                break;
  1024. X            fprintf(stderr,"%s: read error in font\n",PGM);
  1025. X            return(ERROR);
  1026. X        }
  1027. X        if (cur_char <= 0x20 || cur_char > 0xff)
  1028. X        {
  1029. X            fprintf(stderr,"%s: illegal curchar value %04x after char %3d\n",
  1030. X                PGM,cur_char,lastc);
  1031. X            return(ERROR);
  1032. X        }
  1033. X        cf = &font[cur_char];
  1034. X
  1035. X        if ((cf->SH = (short *)malloc(bm_len * sizeof(short))) == (short *)NULL)
  1036. X        {
  1037. X            fprintf(stderr,"%s: not enough memory for bitmap array char %d\n",
  1038. X                PGM,cur_char);
  1039. X            return(ERROR);
  1040. X        }
  1041. X
  1042. X        if (fread(cf->SH, sizeof(short), bm_len, fp) != bm_len)
  1043. X        {
  1044. X            fprintf(stderr,"%s: can't fread char bitmap at char %d\n",
  1045. X                PGM,cur_char);
  1046. X            return(ERROR);
  1047. X        }
  1048. X        cf->len = 16;
  1049. X        cf->hite = bm_len;
  1050. X    }
  1051. X    font_hite = bm_len;
  1052. X    spacelen = 16;
  1053. X    tablen = 96;
  1054. X    return(0);
  1055. X}
  1056. Xfnthite()
  1057. X{
  1058. X    int i;
  1059. X    struct FNT_BITMAP *cf;
  1060. X    int miny, maxy, cury;
  1061. X
  1062. X    miny = 30000;    /* let's be generous */
  1063. X    maxy = 0;
  1064. X
  1065. X    for (i=33; i<256; i++)
  1066. X    {
  1067. X        cf = &font[i];
  1068. X        if (cf->len)
  1069. X        {
  1070. X            cury = 1000 - cf->toffs;
  1071. X            if (cury < miny)
  1072. X                miny = cury;
  1073. X            if (cury+cf->hite > maxy)
  1074. X                maxy = cury+cf->hite;
  1075. X        }
  1076. X    }
  1077. X    return(maxy-miny);
  1078. X}
  1079. X
  1080. Xprintstr(s,y)
  1081. Xunsigned char *s;
  1082. Xint y;
  1083. X{
  1084. X    int done;
  1085. X
  1086. X    if (y >= lines)
  1087. X        return;
  1088. X
  1089. X    if (font_type == HP)
  1090. X        curX = 6*spacelen;
  1091. X    else curX = 120;
  1092. X
  1093. X    curY = y;
  1094. X
  1095. X    done = 0;
  1096. X    while (*s)
  1097. X    {
  1098. X        if (*s == '\n')
  1099. X            break;
  1100. X        else if (*s == ' ')
  1101. X        {
  1102. X            curX += spacelen;
  1103. X            ++s;
  1104. X        }
  1105. X        else if (*s == '\t')
  1106. X        {
  1107. X            int i, tab;
  1108. X            tab = 8-(done%8);
  1109. X            for (i=0; i<tab; i++)
  1110. X                curX += spacelen;
  1111. X            ++s;
  1112. X            done += tab-1;    /* that 1 is added below anyway */
  1113. X        }
  1114. X        else if ((*prt_func)(*s++))
  1115. X            break;
  1116. X
  1117. X        ++done;
  1118. X    }
  1119. X    xmax_used = 216;    /* 1728/8 */
  1120. X}
  1121. X
  1122. Xprt_hpchr(c)
  1123. Xunsigned char c;
  1124. X{
  1125. X    struct FNT_BITMAP *cf;
  1126. X    int i, j, k, curx, cury, localy;
  1127. X
  1128. X/* 
  1129. X   now, we're thinking in terms of 300 dpi, but we're actually
  1130. X   drawing at the fax resolution [either 97.79 or 195.58 dots per vertical inch],
  1131. X   which makes real sense at 3.85 or 7.7 dots per vert. mm [if not to me,
  1132. X   to someone, I hope].
  1133. X   the horizontal resolution is 204.15 dots per inch, or 8.04 dots per mm
  1134. X
  1135. X*/
  1136. X    cf = &font[c];
  1137. X    if (!cf->len)
  1138. X        return(0);
  1139. X
  1140. X    if (curX + cf->clen + cf->loffs >= max_col)
  1141. X        return(ERROR);
  1142. X
  1143. X    cury = curY - cf->toffs;
  1144. X    if (cury < 0)
  1145. X        return(ERROR);
  1146. X
  1147. X    if ((cury+cf->hite) >= lines)
  1148. X        return(ERROR);
  1149. X
  1150. X    curX += cf->loffs;
  1151. X    for (i=0; i<cf->hite; i++)
  1152. X    {
  1153. X        curx = curX;
  1154. X        localy = yptr[cury+i];
  1155. X
  1156. X        for (j=0; j<cf->len; j++)
  1157. X            for (k=0; k<8; k++,curx++)
  1158. X                if (cf->CH[i][j] & bit[k])
  1159. X                    setpix(localy, x204[curx]);
  1160. X    }
  1161. X    curX += cf->clen;
  1162. X    ymax_used = yptr[cury + cf->hite];
  1163. X    return(0);
  1164. X}
  1165. Xprt_bmchr(c)
  1166. Xunsigned char c;
  1167. X{
  1168. X    struct FNT_BITMAP *cf;
  1169. X    int i, cury;
  1170. X    short *s, *d;
  1171. X
  1172. X/*
  1173. X    since we're drawing on 16 bit boundaries [ever so coincidental]
  1174. X    we just mush two bytes of font data over into the bitmap
  1175. X    without even looking at the pixels
  1176. X*/
  1177. X    cf = &font[c];
  1178. X    if (!cf->len)
  1179. X        return(0);
  1180. X
  1181. X    if (curX + bm_len >= max_col)
  1182. X        return(ERROR);
  1183. X
  1184. X    if ((curY < 0) || ((curY+bm_len) >= lines))
  1185. X        return(ERROR);
  1186. X
  1187. X    s = cf->SH;
  1188. X    cury = curY;
  1189. X    for (i=0; i<bm_len; i++, cury++)
  1190. X    {
  1191. X        d = (short *)&block[cury][curX>>3];
  1192. X        *d = *s++;
  1193. X    }
  1194. X    curX += cf->len;
  1195. X    ymax_used = cury;
  1196. X    return(0);
  1197. X}
  1198. END_OF_FILE
  1199.   if test 11391 -ne `wc -c <'faxhost/fntwrite.c'`; then
  1200.     echo shar: \"'faxhost/fntwrite.c'\" unpacked with wrong size!
  1201.   fi
  1202.   # end of 'faxhost/fntwrite.c'
  1203. fi
  1204. if test -f 'faxhost/pbmtog3.c' -a "${1}" != "-c" ; then 
  1205.   echo shar: Will not clobber existing file \"'faxhost/pbmtog3.c'\"
  1206. else
  1207.   echo shar: Extracting \"'faxhost/pbmtog3.c'\" \(4990 characters\)
  1208.   sed "s/^X//" >'faxhost/pbmtog3.c' <<'END_OF_FILE'
  1209. X/* pbmtog3.c - read a portable bitmap and produce a Group 3 FAX file
  1210. X**
  1211. X** Copyright (C) 1989 by Paul Haeberli <paul@manray.sgi.com>.
  1212. X**
  1213. X** Permission to use, copy, modify, and distribute this software and its
  1214. X** documentation for any purpose and without fee is hereby granted, provided
  1215. X** that the above copyright notice appear in all copies and that both that
  1216. X** copyright notice and this permission notice appear in supporting
  1217. X** documentation.  This software is provided "as is" without express or
  1218. X** implied warranty.
  1219. X**
  1220. X** Added kludges so that sierra type fax modems work w/o getting themselves
  1221. X** into a knot: eol must appear on a byte boundary, same goes for eop
  1222. X** [although sometimes faxes can be sent with non aligned eols/eops,
  1223. X** aligning them, however, makes that "sometimes" into an "always"].
  1224. X** Page width must be 1728 pels, no more, no less, with sierra.
  1225. X** Made these kludges optional "-sierra", because I don't see the point
  1226. X** of penalising software for smarter class two modems, where all the messing
  1227. X** is done in hardware.
  1228. X** I include a copy of this mutilated pbmtog3.c with faxpak's fst version.
  1229. X** 26. jan 91, klaus schallhorn.
  1230. X*/
  1231. X
  1232. X#include <stdio.h>
  1233. X#include "pbm.h"
  1234. X#include "g3.h"
  1235. X#ifdef SYSV
  1236. X#include <string.h>
  1237. X#else /*SYSV*/
  1238. X#include <strings.h>
  1239. X#endif /*SYSV*/
  1240. X
  1241. X#define max(a,b) ((a) > (b) ? (a) : (b))
  1242. X
  1243. Xint reversebits, sierra;
  1244. X
  1245. Xmain( argc, argv )
  1246. Xint argc;
  1247. Xchar *argv[];
  1248. X    {
  1249. X    FILE *ifd;
  1250. X    bit *bitrow;
  1251. X    int argn, rows, cols, format, row, col, Cols, i;
  1252. X    char *usage = " [-reversebits] [pbmfile]";
  1253. X
  1254. X    pm_progname = argv[0];
  1255. X
  1256. X    argn = 1;
  1257. X    reversebits = sierra = 0;
  1258. X
  1259. X    if ( argn < argc  && argv[argn][0] == '-' )
  1260. X    {
  1261. X    if ( strncmp(argv[argn],"-reversebits",max(strlen(argv[argn]),2)) == 0 )
  1262. X        reversebits = 1;
  1263. X    else if ( strncmp(argv[argn],"-sierra",max(strlen(argv[argn]),2)) == 0 )
  1264. X        sierra = TRUE;
  1265. X    else pm_usage( usage );
  1266. X    argn++;
  1267. X    }
  1268. X    
  1269. X    if ( argn == argc )
  1270. X    ifd = stdin;
  1271. X    else
  1272. X    {
  1273. X    ifd = pm_openr( argv[argn] );
  1274. X    argn++;
  1275. X    }
  1276. X    
  1277. X    if ( argn != argc )
  1278. X    pm_usage( usage );
  1279. X
  1280. X    pbm_readpbminit( ifd, &cols, &rows, &format );
  1281. X    if (sierra)
  1282. X    Cols = max(1728, cols); /* sierra insists on at least 1728 pels */
  1283. X    else Cols = cols;
  1284. X    bitrow = pbm_allocrow( Cols );
  1285. X
  1286. X    /* Write out four extra rows to get things stabilized. */
  1287. X    for ( col = 0; col < Cols; col++ )
  1288. X    bitrow[col] = PBM_WHITE;
  1289. X
  1290. X    tofax( bitrow, Cols );
  1291. X    tofax( bitrow, Cols );
  1292. X    tofax( bitrow, Cols );
  1293. X    tofax( bitrow, Cols );
  1294. X
  1295. X    /* Write out bitmap. */
  1296. X    putinit();
  1297. X    for ( row = 0; row < rows; row++ )
  1298. X    {
  1299. X    pbm_readpbmrow( ifd, bitrow, cols, format );
  1300. X    for ( i=cols; i<Cols; i++)
  1301. X        bitrow[i] = PBM_WHITE;    /* pad bitmap if < 1728 */
  1302. X    tofax( bitrow, Cols );
  1303. X    }
  1304. X
  1305. X    /* And finish off. */
  1306. X    if (!sierra)
  1307. X    {
  1308. X    for( i = 0; i < 6; i++ )
  1309. X        puteol( );
  1310. X        flushbits( );
  1311. X    }
  1312. X    else puteop();    /* the terrible hack to guarantee multipage faxes */
  1313. X
  1314. X    pm_close( ifd );
  1315. X
  1316. X    exit( 0 );
  1317. X    }
  1318. X
  1319. Xtofax(bitrow,n)
  1320. Xbit *bitrow;
  1321. Xint n;
  1322. X{
  1323. X    int c = 0;
  1324. X
  1325. X    while(n>0) { 
  1326. X    c = 0;
  1327. X    while(*bitrow == PBM_WHITE && n>0) {
  1328. X        bitrow++;
  1329. X        c++;
  1330. X        n--;
  1331. X    }
  1332. X    putwhitespan(c);
  1333. X    c = 0;
  1334. X    if(n==0)
  1335. X        break;
  1336. X    while(*bitrow == PBM_BLACK && n>0) {
  1337. X        bitrow++;
  1338. X        c++;
  1339. X        n--;
  1340. X    }
  1341. X    putblackspan(c);
  1342. X    }
  1343. X    puteol();
  1344. X}
  1345. X
  1346. Xputwhitespan(c)
  1347. Xint c;
  1348. X{
  1349. X    int tpos;
  1350. X    tableentry *te;
  1351. X
  1352. X    if(c>=64) {
  1353. X    tpos = (c/64)-1;
  1354. X    te = mwtable+tpos;
  1355. X    c -= te->count;
  1356. X    putcode(te);
  1357. X    }
  1358. X    tpos = c;
  1359. X    te = twtable+tpos;
  1360. X    putcode(te);
  1361. X}
  1362. X
  1363. Xputblackspan(c)
  1364. Xint c;
  1365. X{
  1366. X    int tpos;
  1367. X    tableentry *te;
  1368. X
  1369. X    if(c>=64) {
  1370. X    tpos = (c/64)-1;
  1371. X    te = mbtable+tpos;
  1372. X    c -= te->count;
  1373. X    putcode(te);
  1374. X    }
  1375. X    tpos = c;
  1376. X    te = tbtable+tpos;
  1377. X    putcode(te);
  1378. X}
  1379. X
  1380. Xputcode(te)
  1381. Xtableentry *te;
  1382. X{
  1383. X    unsigned int mask;
  1384. X    int code;
  1385. X
  1386. X    mask = 1<<(te->length-1);
  1387. X    code = te->code;
  1388. X    while(mask) {
  1389. X     if(code&mask)
  1390. X        putbit(1);
  1391. X    else
  1392. X        putbit(0);
  1393. X    mask >>= 1;
  1394. X    }
  1395. X
  1396. X}
  1397. X
  1398. Xputeol()
  1399. X{
  1400. X    int i;
  1401. X
  1402. X    if (sierra)        /* eol must be byte aligned ........ .......X */
  1403. X    {
  1404. X    flushbits();    /* fflush pels, then add 11 zeros + 1 on bit */
  1405. X    putchar(0);    /* make that at least 11 zero bits */
  1406. X    putchar(reversebits?0x80:0x01);
  1407. X    }
  1408. X    else
  1409. X    {
  1410. X    for(i=0; i<11; i++)
  1411. X        putbit(0);
  1412. X    putbit(1);
  1413. X    }
  1414. X}
  1415. Xputeop()
  1416. X{
  1417. X    int i;
  1418. X
  1419. X    for (i=0; i<5; i++)    /* this is grossly overdoing the ccitt specs! */
  1420. X    {            /* but it makes sure multipage sierra faxes work */
  1421. X    putchar(0);
  1422. X    putchar(reversebits?0x08:0x10);
  1423. X    putchar(reversebits?0x80:0x01);
  1424. X    }
  1425. X    putchar(0);
  1426. X}
  1427. X
  1428. Xint shdata;
  1429. Xint shbit = 0x80;
  1430. X
  1431. Xputinit()
  1432. X{
  1433. X    shdata = 0;
  1434. X    shbit = reversebits ? 0x01 : 0x80;
  1435. X}
  1436. X
  1437. Xint putbit(d)
  1438. Xint d;
  1439. X{
  1440. X    if(d) 
  1441. X    shdata = shdata|shbit;
  1442. X    if ( reversebits )
  1443. X    shbit = shbit<<1;
  1444. X    else
  1445. X    shbit = shbit>>1;
  1446. X    if((shbit&0xff) == 0) {
  1447. X    putchar(shdata);
  1448. X    shdata = 0;
  1449. X    shbit = reversebits ? 0x01 : 0x80;
  1450. X    }
  1451. X}
  1452. X
  1453. Xflushbits( )
  1454. X{
  1455. X    if ( ( reversebits && shbit != 0x01 ) ||
  1456. X     ( ! reversebits && shbit != 0x80 ) ) {
  1457. X    putchar(shdata);
  1458. X    shdata = 0;
  1459. X    shbit = reversebits ? 0x01 : 0x80;
  1460. X    }
  1461. X}
  1462. END_OF_FILE
  1463.   if test 4990 -ne `wc -c <'faxhost/pbmtog3.c'`; then
  1464.     echo shar: \"'faxhost/pbmtog3.c'\" unpacked with wrong size!
  1465.   fi
  1466.   # end of 'faxhost/pbmtog3.c'
  1467. fi
  1468. if test -f 'faxhost/sierracmd.h' -a "${1}" != "-c" ; then 
  1469.   echo shar: Will not clobber existing file \"'faxhost/sierracmd.h'\"
  1470. else
  1471.   echo shar: Extracting \"'faxhost/sierracmd.h'\" \(4730 characters\)
  1472.   sed "s/^X//" >'faxhost/sierracmd.h' <<'END_OF_FILE'
  1473. X/*
  1474. X    sierracmd.h
  1475. X
  1476. X    additional mess for sierra type modem
  1477. X
  1478. X    Various tables for fast lookup.
  1479. X    first released version 0.99a [desperado version]
  1480. X    cleaned up Feb 21st '91.
  1481. X
  1482. X    Copyright (C) 1991, klaus schallhorn, klaus@cnix.uucp
  1483. X
  1484. X    Permission to use, copy, modify, and distribute this software 
  1485. X    and its documentation for any purpose and without fee is hereby 
  1486. X    granted, provided that the above copyright notice appear in 
  1487. X    all copies and that both that copyright notice and this permission 
  1488. X    notice appear in supporting documentation. 
  1489. X
  1490. X    This software is provided "as is" without express or implied warranty.
  1491. X*/
  1492. X
  1493. X
  1494. Xstatic    unsigned char eol_pat[] =    /* eop pattern, reversed */
  1495. X{
  1496. X    0x00,
  1497. X    0x10,
  1498. X    0x00,
  1499. X    0x01,
  1500. X    0x10,
  1501. X    0x00,
  1502. X    0x01,
  1503. X    0x10,
  1504. X    0x00,
  1505. X    0x01
  1506. X};
  1507. Xunsigned char faxbyte[]=    /* have to reverse every shitty byte */
  1508. X{
  1509. X    0x00,    0x80,    0x40,    0xc0,    0x20,    0xa0,    0x60,    0xe0,
  1510. X    0x10,    0x90,    0x50,    0xd0,    0x30,    0xb0,    0x70,    0xf0,
  1511. X    0x08,    0x88,    0x48,    0xc8,    0x28,    0xa8,    0x68,    0xe8,
  1512. X    0x18,    0x98,    0x58,    0xd8,    0x38,    0xb8,    0x78,    0xf8,
  1513. X    0x04,    0x84,    0x44,    0xc4,    0x24,    0xa4,    0x64,    0xe4,
  1514. X    0x14,    0x94,    0x54,    0xd4,    0x34,    0xb4,    0x74,    0xf4,
  1515. X    0x0c,    0x8c,    0x4c,    0xcc,    0x2c,    0xac,    0x6c,    0xec,
  1516. X    0x1c,    0x9c,    0x5c,    0xdc,    0x3c,    0xbc,    0x7c,    0xfc,
  1517. X    0x02,    0x82,    0x42,    0xc2,    0x22,    0xa2,    0x62,    0xe2,
  1518. X    0x12,    0x92,    0x52,    0xd2,    0x32,    0xb2,    0x72,    0xf2,
  1519. X    0x0a,    0x8a,    0x4a,    0xca,    0x2a,    0xaa,    0x6a,    0xea,
  1520. X    0x1a,    0x9a,    0x5a,    0xda,    0x3a,    0xba,    0x7a,    0xfa,
  1521. X    0x06,    0x86,    0x46,    0xc6,    0x26,    0xa6,    0x66,    0xe6,
  1522. X    0x16,    0x96,    0x56,    0xd6,    0x36,    0xb6,    0x76,    0xf6,
  1523. X    0x0e,    0x8e,    0x4e,    0xce,    0x2e,    0xae,    0x6e,    0xee,
  1524. X    0x1e,    0x9e,    0x5e,    0xde,    0x3e,    0xbe,    0x7e,    0xfe,
  1525. X    0x01,    0x81,    0x41,    0xc1,    0x21,    0xa1,    0x61,    0xe1,
  1526. X    0x11,    0x91,    0x51,    0xd1,    0x31,    0xb1,    0x71,    0xf1,
  1527. X    0x09,    0x89,    0x49,    0xc9,    0x29,    0xa9,    0x69,    0xe9,
  1528. X    0x19,    0x99,    0x59,    0xd9,    0x39,    0xb9,    0x79,    0xf9,
  1529. X    0x05,    0x85,    0x45,    0xc5,    0x25,    0xa5,    0x65,    0xe5,
  1530. X    0x15,    0x95,    0x55,    0xd5,    0x35,    0xb5,    0x75,    0xf5,
  1531. X    0x0d,    0x8d,    0x4d,    0xcd,    0x2d,    0xad,    0x6d,    0xed,
  1532. X    0x1d,    0x9d,    0x5d,    0xdd,    0x3d,    0xbd,    0x7d,    0xfd,
  1533. X    0x03,    0x83,    0x43,    0xc3,    0x23,    0xa3,    0x63,    0xe3,
  1534. X    0x13,    0x93,    0x53,    0xd3,    0x33,    0xb3,    0x73,    0xf3,
  1535. X    0x0b,    0x8b,    0x4b,    0xcb,    0x2b,    0xab,    0x6b,    0xeb,
  1536. X    0x1b,    0x9b,    0x5b,    0xdb,    0x3b,    0xbb,    0x7b,    0xfb,
  1537. X    0x07,    0x87,    0x47,    0xc7,    0x27,    0xa7,    0x67,    0xe7,
  1538. X    0x17,    0x97,    0x57,    0xd7,    0x37,    0xb7,    0x77,    0xf7,
  1539. X    0x0f,    0x8f,    0x4f,    0xcf,    0x2f,    0xaf,    0x6f,    0xef,
  1540. X    0x1f,    0x9f,    0x5f,    0xdf,    0x3f,    0xbf,    0x7f,    0xff
  1541. X};
  1542. X
  1543. X            /* faxes are compressed to reduce tx time */
  1544. X            /* then they're expanded, to increase tx time */
  1545. Xstatic    int not_so_fast[] =
  1546. X{
  1547. X    20, 40, 10, 10, 5, 40, 20, 0
  1548. X};            /* at least to allow for rx hardware catch up */
  1549. X            /* as in carriage return [think typewriter] */
  1550. X
  1551. X
  1552. X            /* possible answers from sierra type gizzmo */
  1553. Xstruct    SIERRA_CMDSET    /* not all of them are used */
  1554. X{
  1555. X    char    *txtstring,
  1556. X        retcode;
  1557. X} sierra_cmds[]=
  1558. X{
  1559. X/* 0*/    "OK",            '0',    /* sort of a wild card */
  1560. X/* 1*/    "ANSWER TONE",        'a',    /* Answer tone detected */
  1561. X/* 2*/    "CONFIRM TO RX",    'g',    /* confirmation to receive */
  1562. X/* 3*/    "CONNECT 2400",        'w',    /* connection established @ 2400 baud */
  1563. X/* 4*/    "CONNECT 4800",        'x',    /* @ 4800 */
  1564. X/* 5*/    "CONNECT 7200",        'y',    /* @ 7200 */
  1565. X/* 6*/    "CONNECT 9600",        'z',    /* @ 9600 */
  1566. X/* 7*/    "CRP",            'c',    /* come again? */
  1567. X/* 8*/    "REMOTE CAPABILITIES",    'b',    /* capabilities claimed */
  1568. X/* 9*/    "DCN",            'd',    /* hangup */
  1569. X/*10*/    "CAN'T TRAIN",        'f',    /* cant train this one to do what I want */
  1570. X/*11*/    "INVALID FRME",        'i',    /* invalid frame */
  1571. X/*12*/    "MSG CONFMD",        'm',    /* roger */
  1572. X/*13*/    "RETRAIN",        'h',    /* !roger */
  1573. X/*14*/    "RTRN OK",        'j',    /* seems to have sunk in now */
  1574. X/*15*/    "BUSY",            '7',    /* someone's sitting on the line */
  1575. X/*16*/    "NO CARRIER",        '3',    /* someone chopped the line */
  1576. X/*17*/    "CRC ERR IN FRAME",    'e',    /* no point in pursuing this */
  1577. X/*18*/    "*UNKNOWN*",        '\0'    /* god knows what happened */
  1578. X};
  1579. X
  1580. X#define    OK        0    /* index into the lot above */
  1581. X#define    ANSWER_TONE    1
  1582. X#define    CONFIRM_TO_RX    2
  1583. X#define    CONNECT24    3
  1584. X#define    CONNECT48    4
  1585. X#define    CONNECT72    5
  1586. X#define    CONNECT96    6
  1587. X#define    CRP        7
  1588. X#define    WHAT_I_CAN    8
  1589. X#define    DCN        9
  1590. X#define    CANNOT_TRAIN    10
  1591. X#define    INVALID_FRM    11
  1592. X#define    MSG_CONFMD    12
  1593. X#define    RETRAIN        13
  1594. X#define    RTRN_OK        14
  1595. X#define    BUSY        15
  1596. X#define    NO_CARRIER    16
  1597. X#define    CRC_IN_FRAME    17
  1598. X#define    UNKNOWN        18
  1599. X#define    LAST_SIERRA_ANS    18
  1600. X
  1601. X#define    CONNECT_MIN    3
  1602. X#define    CONNECT_24    (sierra_cmds[3].retcode)
  1603. X#define    CONNECT_48    (sierra_cmds[4].retcode)
  1604. X#define    CONNECT_72    (sierra_cmds[5].retcode)
  1605. X#define    CONNECT_96    (sierra_cmds[6].retcode)
  1606. X#define    CONNECT_MAX    7
  1607. X
  1608. X#ifdef    USE_IXON
  1609. X#define    FLOW_CTL    4
  1610. X#define    XON_CHAR    0x11
  1611. X#define    XOFF_CHAR    0x13
  1612. X#else
  1613. X#define    FLOW_CTL    3
  1614. X#endif
  1615. X
  1616. X#define    MARKER        0x7e
  1617. X
  1618. Xstatic    int line_minlen;
  1619. X
  1620. Xstatic    unsigned char zeros[256];
  1621. Xint    have_dis, have_cfr, have_connect;
  1622. Xstatic    unsigned char last1, cur;
  1623. Xstatic    int eols, eof;
  1624. END_OF_FILE
  1625.   if test 4730 -ne `wc -c <'faxhost/sierracmd.h'`; then
  1626.     echo shar: \"'faxhost/sierracmd.h'\" unpacked with wrong size!
  1627.   fi
  1628.   # end of 'faxhost/sierracmd.h'
  1629. fi
  1630. if test -f 'sample.fax.list' -a "${1}" != "-c" ; then 
  1631.   echo shar: Will not clobber existing file \"'sample.fax.list'\"
  1632. else
  1633.   echo shar: Extracting \"'sample.fax.list'\" \(275 characters\)
  1634.   sed "s/^X//" >'sample.fax.list' <<'END_OF_FILE'
  1635. X# sample fax mailing list
  1636. X# phone no   ftao, starts with a colon        opt. comment    
  1637. X#------------------------------------------------------------
  1638. X12345678   :for the attention of fred bloggs    # comment
  1639. X9274356                        # no ftao
  1640. X87340875   :z. Hd. Herrn Meier            # needs it on time
  1641. END_OF_FILE
  1642.   if test 275 -ne `wc -c <'sample.fax.list'`; then
  1643.     echo shar: \"'sample.fax.list'\" unpacked with wrong size!
  1644.   fi
  1645.   # end of 'sample.fax.list'
  1646. fi
  1647. echo shar: End of archive 4 \(of 5\).
  1648. cp /dev/null ark4isdone
  1649. MISSING=""
  1650. for I in 1 2 3 4 5 ; do
  1651.     if test ! -f ark${I}isdone ; then
  1652.     MISSING="${MISSING} ${I}"
  1653.     fi
  1654. done
  1655. if test "${MISSING}" = "" ; then
  1656.     echo You have unpacked all 5 archives.
  1657.     rm -f ark[1-9]isdone
  1658. else
  1659.     echo You still must unpack the following archives:
  1660.     echo "        " ${MISSING}
  1661. fi
  1662. exit 0
  1663. exit 0 # Just in case...
  1664.